package com.shudes.pt.db;

import org.hibernate.*;
import org.hibernate.cfg.*;

abstract public class SessionUtil {

	private static final SessionFactory sessionFactory;
	
	static { 
		try { 
			sessionFactory = new Configuration().configure().buildSessionFactory();			
		} catch (Throwable ex) { 
			ex.printStackTrace();
			throw new ExceptionInInitializerError(ex);
		}
	}

	public static SessionFactory getSessionFactory() {
		return sessionFactory;
	}
}
